package com.he.security.crypto.factory;

import com.he.security.crypto.bcrypt.BCryptPasswordEncoder;
import com.he.security.crypto.password.DelegatingPasswordEncoder;
import com.he.security.crypto.password.PasswordEncoder;

import java.util.HashMap;
import java.util.Map;

public class PasswordEncoderFactories {


    public static PasswordEncoder createDelegatingPasswordEncoder() {
        String encodingId = "bcrypt";
        Map<String, PasswordEncoder> encoders = new HashMap<>();
        encoders.put(encodingId, new BCryptPasswordEncoder());


        return new DelegatingPasswordEncoder(encodingId, encoders);
    }

}
